package com.service;

import com.model.Comment;
import com.model.PostDetail;
import java.sql.SQLException;
import java.util.List;

public interface PostDetailService {
    // 获取帖子详情
    PostDetail getPostDetail(int postId) throws SQLException;

    // 获取帖子的评论列表
    List<Comment> getPostComments(int postId) throws SQLException;

    // 统计帖子评论数
    int getCommentCount(int postId) throws SQLException;

    // 处理点赞/取消点赞
    boolean toggleLike(int postId, int userId) throws SQLException;

    // 检查用户是否已点赞
    boolean isUserLiked(int postId, int userId) throws SQLException;

    // 新增评论
    boolean addComment(Comment comment) throws SQLException;
}